// path-test.js
const fs = require('fs')
const path = require('path')

// resolve
const root = path.resolve(__dirname)
console.log('__dirname', __dirname) //D:\work\zp-crud-page\plop\tasks
console.log('root', root) //D:\work\zp-crud-page\plop\tasks

// join
const newPath = path.join(__dirname, 'packages') //--> 左斜杠会转成标准的反斜杠
console.log('newPath', newPath)  //D:\work\zp-crud-page\packages

const twoPath = path.join(newPath, 'packages') //--> 左斜杠会转成标准的反斜杠 绝对和相对路径合并
console.log('twoPath', twoPath)  //D:\work\zp-crud-page\packages


